<?php


/**教师管理程序*/

define('IN_ECS',true);

require(dirname(__FILE__) . '/includes/init.php');
require_once(ROOT_PATH . '/' . ADMIN_PATH . '/includes/lib_teacher.php');
include_once(ROOT_PATH . '/includes/cls_image.php');
$image = new cls_image($_CFG['bgcolor']);
$exc = new exchange($ecs->table('teacher_list'), $db, 'teacher_id', 'teacher_name');

if ($_REQUEST['act'] == 'list')
{
//    admin_priv('teacher_manage');
    $smarty->assign('ur_here',      $_LANG['teacher_list']);
    $teacher_list = teacher_list();

    $smarty->assign('teacher_list', $teacher_list['teacher']);
    $smarty->assign('filter',       $teacher_list['filter']);
    $smarty->assign('record_count', $teacher_list['record_count']);
    $smarty->assign('page_count',   $teacher_list['page_count']);

    /* 排序标记 */
    $sort_flag  = sort_flag($teacher_list['filter']);
    $smarty->assign($sort_flag['tag'], $sort_flag['img']);

//    $smarty->assign('teacher_name', $teacher_list['teacher_name']);
//    $smarty->assign('age', $teacher_list['age']);
//    $smarty->assign('sex',   $teacher_list['sex']);


    assign_query_info();
    $smarty->display('teacher_list.htm');
}
/**
 * Created by PhpStorm.
 * User: tuhao
 * Date: 2016/9/29
 * Time: 10:28
 */